<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateProductsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        
        Schema::create('products', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->increments('category_id');
            $table->increments('brand_id');
            $table->increments('is_onsale');
            $table->increments('price');
            $table->string('thumb');
            $table->boolean('is_top')->default(true);
            $table->increments('is_onsale');
            $table->increments('is_recommend');
            $table->increments('is_hot');
            $table->increments('is_new');
            $table->increments('stock')->default('-1');
            $table->tinyInteger('sort_order')->default('100');
            $table->string('desc');
            $table->string('content');
            $table->string('markdown_html_code');
            $table->timestamps();
        });
    
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
